﻿<%@ Control Language="C#" EnableViewState="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<asp:Panel ID="panel1" runat="server">
<script type="text/javascript">
    function select_project(userType) {
        var url = 'GetCompanyList.aspx?userType='+escape(userType)+"&rd="+Math.random() ;
        var feature = "dialogWidth:" + 500 + "px;dialogHeight:" + 450 + "px;scroll:yes;status:no;help:no;center:1";
        var project_info = window.showModalDialog(url, '', feature);
        var tt=document.getElementById('<%=txt征收部门.ClientID %>');
        if(userType=="征收实施单位"){tt=document.getElementById('<%=txt征收实施单位.ClientID %>')}
        if (project_info != undefined && project_info.length > 1) {
            tt.value = project_info[1];          
        }
    }
    function ckNull(){
        var tt=document.getElementById('<%=txt项目名称.ClientID %>').value;
        if (tt == "" || tt == null) { alert('请输入项目名称！'); return false; }
      
        var qs = document.getElementById('<%=ddl区属.ClientID %>');
        var qsv = qs.value;
        if( qsv!="") {
            qsv = qsv.replace("区", '');
        }

        var bm = document.getElementById('<%=txt征收部门.ClientID %>');
        var bmv = bm.value;
        var dw = document.getElementById('<%=txt征收实施单位.ClientID %>');
        var dwv = dw.value;
        var test = new RegExp(qsv, "g");
        if(bmv!="" && dwv!=""){
            if (bmv.match(test) == null || dwv.match(test) == null) {
                alert("征收部门，这个征收实施单位与所选区属不一致");
                return false;
            }
        }
        /*立项号判断*/
        var txtlxh = document.getElementById('<%= txt立项号.ClientID %>');
        var lxhv = txtlxh.value;
        if (lxhv != "" && lxhv != null) {
            if (isNaN(lxhv)) {
                alert("立项号必须为数字");
                return false;
            }
            if (lxhv.length != 9) {
                alert("立项号必须为9为数字");
                return false;
            }
            if(lxhv.substr(6,3)=="000"){
                alert("立项号后三位不能为000");
                return false;
            }
        }
        
       return true;
    }
    window.onload = function aa() {
        var tt = document.getElementById('<%=txt提交状态.ClientID %>').value;
        var t1 = document.getElementById('<%=btnSave.ClientID %>');
        var t2 = document.getElementById('<%=btnUpfile.ClientID %>');
        var t3 = document.getElementById('<%=inputbtn1.ClientID %>');
        var t4 = document.getElementById('<%=inputbtn2.ClientID %>');
        if (tt == "1") { t1.style.display = "none"; t2.value = "附件列表"; t3.style.display = "none"; t4.style.display = "none"; }

        var temp = '<%=HttpContext.Current.Request["PID"] %>';
        var t5 = document.getElementById('<%=lxh.ClientID %>');
        var t6 = document.getElementById('<%=btnUpfile.ClientID %>');
        if (temp == null || temp == "") {
            
            t6.style.display = "none"; 
        }

        var temt = '<%=HttpContext.Current.Request["TYPE"] %>';

        var t7 = document.getElementById('<%=btnBack.ClientID %>');
        var t8 = document.getElementById('<%=LinkButton1.ClientID %>');
        var t9 = document.getElementById("Button1");
        if (temt != null && temt != '') {
            t6.style.display = "none";
            t7.style.display = "none";
            t8.style.display = "none";
            t9.style.display = "block";
        }
    };
       function displaytr(){
        document.getElementById("tr1").style.display='none';
    }
    </script>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-image: url(<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>images/menuthb.png);
        margin-top: 1px">
        <tr>        
            <td valign="middle" height="30" >
                <font style="font-size: 14px; font-weight: bold; color: #3E7CC3; float: left;color:black">
                    &nbsp; 项目启动申请  </font>
            </td>
        </tr>
    </table>
        <div class="inpuDiv">
            <table cellpadding="0" cellspacing="0" border="0" class="window_tab_list">
                <tr>
                    <th colspan="6" style="text-align: center; line-height: 20px;">
                        项目启动申请表
                    </th>
                </tr>
                <tr>
                    <td>
                        项目名称
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt项目名称"></asp:TextBox>
                    </td>
                </tr>
                <tr id="lxh" runat="server">
                    <td>
                        项目立项号
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt立项号"></asp:TextBox>
                        <label style=" font-size:12; color:Red">该立项号可自动生成，不需手输</label>
                    </td>
                </tr>
                <tr>
                    <td>
                        项目批文号
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt项目批文号"></asp:TextBox>
                        <asp:Label ID="Label2" runat="server" Text="需上传：项目批准附件！" ForeColor="Red" Font-Size="11px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        建设用地规划许可证号
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt用地规划许可证号" SkinID="InputGreen" Width="250"></asp:TextBox>
                        <asp:Label ID="Label3" runat="server" Text="需上传：规划许可附件！" ForeColor="Red" Font-Size="11px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        国有土地使用权批准文件
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt国有土地使用权批准文件" SkinID="InputGreen" Width="250"></asp:TextBox>
                        <asp:Label ID="Label4" runat="server" Text="需上传：土地权属证明附件！" ForeColor="Red" Font-Size="11px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        项目所在地点
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt项目地址" SkinID="InputGreen" Width="250"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="建设单位"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt建设单位" SkinID="InputGreen" Width="250"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        征收部门
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt征收部门" TextMode="MultiLine" Rows="3" Width="250" onfocus="this.blur()"></asp:TextBox>
                        <input type="button" value="选择" onclick="select_project('征收部门')" class="button" runat="server" id="inputbtn1" />
                    </td>
                </tr>
                <tr>
                    <td>
                        征收实施单位
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt征收实施单位" TextMode="MultiLine" Rows="3" Width="250" onfocus="this.blur()"></asp:TextBox>
                        <input type="button" value="选择" onclick="select_project('征收实施单位')" class="button" runat="server" id="inputbtn2" />
                    </td>
                </tr>
                <tr>
                    <td>
                        区属
                    </td>
                    <td>
                        <asp:DropDownList ID="ddl区属" runat="server" AutoPostBack="true"></asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        征收范围
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txt征收范围" TextMode="MultiLine" Rows="10" Width="300">
                        </asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="Label5" runat="server" Text="现有附件类别："></asp:Label>
                        <asp:Label ID="提示" runat="server" Text="" ForeColor="Red" Font-Size="12px"></asp:Label>
                        <asp:Label ID="Label6" runat="server" Text="，请点击附件上传按钮补全缺失类别中的附件材料！ "></asp:Label>
                        <asp:Label ID="Label7" runat="server" Text="未上传三大附件！请上传！" ForeColor="Red" Font-Size="12px"></asp:Label>
                    </td>
                </tr>
                <tr id="tr1">
                <td >
                    征收红线
                </td>
                <td>
                    <input id="Button2" type="button" value="点击编辑" onclick="window.open('http://192.168.253.20/redline/index.html?id=<%=Request["PID"] %>')" /><asp:Label
                        ID="showhxmsg" runat="server" Text=""></asp:Label>
                </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center; border: 0; line-height: 30px;">
                        <input id="Button1" type="button" value="返回" onclick="history.back();" style="display:none;" />
                        <asp:LinkButton ID="LinkButton1" runat="server">征收范围历史修改记录查询</asp:LinkButton>&nbsp;&nbsp;
                        <asp:Button ID="btnUpfile" runat="server" Text="附件上传" />&nbsp;&nbsp;
                        <asp:Button ID="btnSave" runat="server" Text="保存" OnClientClick="return ckNull();" />&nbsp;&nbsp;
                        <asp:Button ID="btnBack" runat="server" Text="返回" />
                    </td>
                </tr>
            </table>
            <div style="display:none;">
                <asp:TextBox ID="txtID" runat="server"></asp:TextBox>
                <asp:TextBox ID="txt提交状态" runat="server"></asp:TextBox>
            </div>
        </div>
    <CBW:MPPersistence  ID="Persistence1" runat="server"></CBW:MPPersistence>
</asp:Panel>
